package com.gf.snoopy.dto;

import java.util.Date;

import com.gf.snoopy.constants.enumc.TemplateType;

public class TemplateDto {
    private Integer id;

    private String name;

    private Integer templateType;
    
    private String templateTypeStr;

    private String address;

    private Date createDate;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

	public Integer getTemplateType() {
		return templateType;
	}

	public void setTemplateType(Integer templateType) {
    	TemplateType type = TemplateType.parse(templateType);
    	if(type!=null){
    		templateTypeStr = type.getDesc();
    	}
		this.templateType = templateType;
	}

	public String getTemplateTypeStr() {
		return templateTypeStr;
	}

	public void setTemplateTypeStr(String templateTypeStr) {
		this.templateTypeStr = templateTypeStr;
	}
}
